/*
 * @Author: 朱自强
 * @Date: 2024-03-08 08:53:11
 * @LastEditors: 朱自强
 * @LastEditTime: 2024-03-14 09:33:14
 * @FilePath: \A-LOT-OF-TEST-VUE3\src\router\index.ts
 * @Description:
 *
 * Copyright (c) 2024 by 朱自强, All Rights Reserved.
 */
import { createRouter, createWebHistory } from 'vue-router'
import { BookOutline as BookIcon } from '@vicons/ionicons5'

export const routers = [
  {
    path: '/',
    name: 'home',
    meta: {
      title: '首页',
      icon: BookIcon
    },
    component: () => import('@/views/Home/HomeIndex.vue')
  },
  {
    path: '/someExample',
    name: 'someExample',
    meta: {
      title: '各种小测试',
      icon: BookIcon
    },
    children: [
      {
        path: '/scroll',
        name: 'scroll',
        meta: {
          title: '滚动到固定位置',
          icon: BookIcon
        },
        component: () => import('@/views/SomeExample/ScrollTop.vue')
      },
      {
        path: '/aggridTable',
        name: 'aggridTable',
        meta: {
          title: 'aggrid表格',
          icon: BookIcon
        },
        component: () => import('@/views/SomeExample/AggridTable.vue')
      },
      {
        path: '/inputSelect',
        name: 'inputSelect',
        meta: {
          title: 'inputSelect',
          icon: BookIcon
        },
        component: () => import('@/views/YInputSelect/YInputSelect.vue')
      }
    ]
  },
  {
    path: '/dynamicFormManager',
    name: 'dynamicFormManager',
    meta: {
      title: '表单管理',
      icon: BookIcon
    },
    children: [
      {
        path: '/dynamicFormDesign',
        name: 'dynamicFormDesign',
        meta: {
          title: '表单设计',
          icon: BookIcon
        },
        component: () => import('@/views/DynamicForm/DynamicForm.vue')
      }
    ]
  }
]

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: routers
})

export default router
